//
//  AdvertListModel.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/6/13.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit
import ObjectMapper

class AdvertListModel: BaseModel, Mappable {
    var endRow : Int?
    var firstPage : Int?
    var hasNextPage : Bool?
    var hasPreviousPage : Bool?
    var isFirstPage : Bool?
    var isLastPage : Bool = false
    var lastPage : Int?
    var list : [AdvertInforModel] = []
    var navigateFirstPage : Int?
    var navigateLastPage : Int?
    var navigatePages : Int?
    var navigatepageNums : [Int]?
    var nextPage : Int?
    var orderBy : String?
    var pageNum : Int?
    var pageSize : Int?
    var pages : Int?
    var prePage : Int?
    var size : Int?
    var startRow : Int?
    var total : Int?
    
    required init?(map: Map){}
    private override init(){}
    
    func mapping(map: Map)
    {
        endRow <- map["endRow"]
        firstPage <- map["firstPage"]
        hasNextPage <- map["hasNextPage"]
        hasPreviousPage <- map["hasPreviousPage"]
        isFirstPage <- map["isFirstPage"]
        isLastPage <- map["isLastPage"]
        lastPage <- map["lastPage"]
        list <- map["list"]
        navigateFirstPage <- map["navigateFirstPage"]
        navigateLastPage <- map["navigateLastPage"]
        navigatePages <- map["navigatePages"]
        navigatepageNums <- map["navigatepageNums"]
        nextPage <- map["nextPage"]
        orderBy <- map["orderBy"]
        pageNum <- map["pageNum"]
        pageSize <- map["pageSize"]
        pages <- map["pages"]
        prePage <- map["prePage"]
        size <- map["size"]
        startRow <- map["startRow"]
        total <- map["total"]
        
    }
    
    
}
class AdvertInforModel: BaseModel, Mappable{
    var address : String = ""
    var createdAt : String = ""
    var currency : String = ""
    var dealCount : Int?
    var highOpinionRatio : String = ""
    var historyDealAmount : Int?
    var id : Int?
    var limitLowerMoney : Double = 0.00
    var limitUpperMoney : Double = 0.00
    var lowestPrice : Double = 0.00
    var message : String = ""
    var moneyType : String = ""
    var needVerify : Int?
    var number : String = ""
    var occupied : Int?
    var openTime : Int?
    var paymentMethod : Int = 0
    var portrait : String = ""
    var premium : Int?
    var price : Double = 0.00
    var status : Int?
    var trustTrade : Int?
    var type : Int = 0
    var updatedAt : String = ""
    var userId : Int?
    var userName : String = ""
    var userPhone : String = ""
    
    required init?(map: Map){}
    private override init(){}
    
    func mapping(map: Map)
    {
        address <- map["address"]
        createdAt <- map["createdAt"]
        currency <- map["currency"]
        dealCount <- map["dealCount"]
        highOpinionRatio <- map["highOpinionRatio"]
        historyDealAmount <- map["historyDealAmount"]
        id <- map["id"]
        limitLowerMoney <- map["limitLowerMoney"]
        limitUpperMoney <- map["limitUpperMoney"]
        lowestPrice <- map["lowestPrice"]
        message <- map["message"]
        moneyType <- map["moneyType"]
        needVerify <- map["needVerify"]
        number <- map["number"]
        occupied <- map["occupied"]
        openTime <- map["openTime"]
        paymentMethod <- map["paymentMethod"]
        portrait <- map["portrait"]
        premium <- map["premium"]
        price <- map["price"]
        status <- map["status"]
        trustTrade <- map["trustTrade"]
        type <- map["type"]
        updatedAt <- map["updatedAt"]
        userId <- map["userId"]
        userName <- map["userName"]
        userPhone <- map["userPhone"]
    }
}
